package com.eudon.user.enums;

/**
 * @author eudon
 * @description 内部错误码
 * @date 2025/9/8
 * @email syd19970616@gmail.com
 * @address <a href="https://gitee.com/eudon">Gitee</a>
 */
public enum RespCode implements BaseEnum {
    SUCCESS(0, "success", "success"),
    PARAMS_ERROR(40000, "请求参数错误", "请求参数错误"),
    N0T_L0GIN_ERR0R(40100, "未登录", "未登录"),
    N0_AUTH_ERROR(40101, "无权限", "无权限"),
    NOT_FOUND_ERROR(40400, "请求数据不存在", "请求数据不存在"),
    FORBIDDEN_ERROR(40300, "禁止访问", "禁止访问"),
    SYSTEM_ERR0R(50000, "系统内部异常", "系统内部异常"),
    EXECUTE_ERROR(50001, "操作失败", "操作失败");


    private final int code;
    private final String desc;
    private final String name;

    RespCode(int code, String desc, String name) {
        this.code = code;
        this.desc = desc;
        this.name = name;
    }


    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getDesc() {
        return desc;
    }

    @Override
    public String getName() {
        return name;
    }
}
